cmake_minimum_required(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "-g")


# OpenCV include
#include_directories(/usr/local/include/opencv)
#include_directories(/usr/local/include)


# Where to look for library files
link_directories(/usr/lib)
link_directories(./libs)
link_directories(/usr/local/lib)
link_directories(${OUTPUT})
#link_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/build/lib)

#include_directories(/usr/include/pcl-1.3/)
#include_directories(/home/johane/Desktop/PCL-1.4.0-Source/build/)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/io/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/segmentation/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/features/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/build/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/visualization/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/sample_consensus/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/range_image/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/filters/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/keypoints/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/search/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/apps/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/kdtree/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/octree/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/surface/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/common/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/io/include)
#include_directories(/home/johane/Desktop/PCL_new/PCL-1.4.0-Source/registration/include)

#include_directories(/home/johane/Desktop/g2o/g2o/trunk/build/g2o/)
#include_directories(/home/johane/Desktop/g2o/g2o/trunk/)


include_directories(/usr/include/eigen3/)
#include_directories(/usr/include/vtk/)
include_directories(${PROJECT_ROOT}/src)

#add_library(InformationPresentation STATIC InformationPresentation.cpp myalgebra.cpp)
#target_link_libraries(InformationPresentation opencv_core opencv_highgui opencv_imgproc)
#install(TARGETS InformationPresentation DESTINATION ${OUTPUT})

#add_library(IntegralImage STATIC IntegralImage.cpp)
#target_link_libraries(IntegralImage opencv_core opencv_highgui opencv_imgproc)
#install(TARGETS IntegralImage DESTINATION ${OUTPUT})

#add_library(myutils STATIC myutils.cpp)
#install(TARGETS myutils DESTINATION ${OUTPUT})

add_library(BagOfWords ./libbow/trunk/src/Descriptor.cpp ./libbow/trunk/src/Codebook.cpp ./libbow/trunk/src/CodebookFile.cpp)
install(TARGETS BagOfWords DESTINATION ${OUTPUT})

add_library(RGBDCamera STATIC RGBDCamera.cpp RGBDCamera_FB.cpp)
target_link_libraries(RGBDCamera BagOfWords)
target_link_libraries(RGBDCamera opencv_core opencv_highgui opencv_imgproc)
target_link_libraries(RGBDCamera opencv_calib3d opencv_contrib opencv_core opencv_features2d opencv_flann opencv_gpu opencv_highgui opencv_imgproc opencv_legacy opencv_ml opencv_objdetect opencv_ts opencv_video)
install(TARGETS RGBDCamera DESTINATION ${OUTPUT})

#add_library(RGBDCamera STATIC RGBDCamera.cpp)
#target_link_libraries(RGBDCamera opencv_core opencv_highgui opencv_imgproc)
#target_link_libraries(RGBDCamera opencv_calib3d opencv_contrib opencv_core opencv_features2d opencv_flann opencv_gpu opencv_highgui opencv_imgproc opencv_legacy opencv_ml opencv_objdetect opencv_ts opencv_video)
#target_link_libraries(RGBDCamera pcl_filters pcl_visualization pcl_features pcl_range_image pcl_octree pcl_kdtree pcl_apps pcl_sample_consensus pcl_common pcl_range_image_border_extractor pcl_surface pcl_segmentation pcl_registration pcl_keypoints pcl_io pcl_search)
#target_link_libraries(RGBDCamera myutils)
#install(TARGETS RGBDCamera DESTINATION ${OUTPUT})

#add_library(Map STATIC Map.cpp)
#target_link_libraries(Map RGBDCamera)
#target_link_libraries(Map opencv_core opencv_highgui opencv_imgproc)
#target_link_libraries(Map pcl_filters pcl_visualization pcl_features pcl_range_image pcl_octree pcl_kdtree pcl_apps pcl_sample_consensus pcl_common pcl_range_image_border_extractor pcl_surface pcl_segmentation pcl_registration pcl_keypoints pcl_io pcl_search)
#target_link_libraries(Map myutils)
#target_link_libraries(Map g2o_cli g2o_core g2o_ext_csparse g2o_interface g2o_math_groups g2o_parser g2o_solver_csparse g2o_solver_dense g2o_solver_pcg g2o_stuff g2o_types_icp g2o_types_sba g2o_types_sim3 g2o_types_slam2d g2o_types_slam3d)

#install(TARGETS Map DESTINATION ${OUTPUT})

add_subdirectory(test)

